package com.oplink.webems.modules.sys.dao;

import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Component;

import com.oplink.webems.common.persistence.BaseDao;
import com.oplink.webems.common.persistence.BaseDaoImpl;
import com.oplink.webems.modules.sys.entity.User;

/**
 * 
 * <p>
 * Title:
 * </p>
 * <p>
 * Description:
 * </p>
 * <p>
 * Copyright: Copyright (c) 2014
 * </p>
 * <p>
 * Company: Oplink Communications
 * </p>
 * 
 * @author
 ** @serialData 2014-8-29 上午9:16:59
 * @version 1.0
 */

public interface EmsUserDao extends EmsUserDaoCustom, CrudRepository<User, Long> {
	@Modifying
	@Query("update User set delFlag='" + User.DEL_FLAG_DELETE + "' where id = ?1")
	public int deleteById(Long id);
}

/**
 * DAO�Զ���ӿ�
 * 
 * @author Oplink OMS
 */
interface EmsUserDaoCustom extends BaseDao<User> {
}

/**
 * DAO�Զ���ӿ�ʵ��
 * 
 * @author Oplink OMS
 */
@Component
class EmsUserDaoImpl extends BaseDaoImpl<User> implements EmsUserDaoCustom {

}
